﻿using System;
using METU_CMT.Business;

namespace METU_CMT
{
    public partial class StudentCourseMainScreen : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(!IsPostBack)
            {
                BindCourseInfo();
            }
        }

        private void BindCourseInfo()
        {
            dtgInstructors.DataSource = EntityFactory.GetInstructorsOfCourse( );
            dtgInstructors.DataBind();

            dtgTAs.DataSource = EntityFactory.GetTeachingAssistantsOfCourse(EntityFactory.CourseId);
            dtgTAs.DataBind();
        }

        protected void OnLnkBtnAnnouncementsClicked(object sender, EventArgs e)
        {
            Response.Redirect("~/ShowAnnouncementsScreen.aspx");
        }

        protected void OnLnkBtnScheduleClicked(object sender, EventArgs e)
        {
            Response.Redirect("~/ShowScheduleScreen.aspx");
        }

        protected void OnLnkBtnReviewDocumentsClicked(object sender, EventArgs e)
        {
            Response.Redirect("~/DownloadReviewTeamsDocumentsScreen.aspx");
        }

        protected void OnLnkBtnLectureNotesClicked(object sender, EventArgs e)
        {
            Response.Redirect("~/ShowLectureNotesScreen.aspx");
        }

    }
}